<!DOCTYPE html>
<html lang="en">
    <head>
        <style>
            body {
                width: 100vw;
                height: 100vh;
                font-family: system-ui;
                background-color: #f1f1f1;
                color: #212529;
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
            }

            .header {
                display: flex;
                justify-content: space-between;
                align-items: center;
                gap: 10px;
            }

            .header a {
                color: white;
                background-color: #714b67;
                max-width: 100px;
                padding: 8px 16px;
                border-radius: 4px;
                text-decoration: none;
                font-weight: 500;
            }

            .header a:hover {
                background-color: #52374B;
                color: white;
            }

            h1 {
                margin-right: auto;
            }

            h2 {
                color: #6c757d;
                font-weight: normal;
                margin-top: 0;
            }

            a {
                font-weight: bold;
                color: #714b67;
            }

            a:hover {
                color: blue;
            }

            .container {
                max-width: 600px;
                padding: 10px 20px;
                background: #ffffff;
                border-radius: 8px;
            }

            .footer {
                display: flex;
                gap: 1rem;
                margin-top: 12px;
            }
        </style>
        <title>IoT Box is down</title>
    </head>
    <body>
        <div class="container">
            <div class="header">
                <h1>IoT Box is down</h1>
                <a href="/odoo-logs/odoo/odoo-server.log">Download Odoo logs</a>
                <a href="/odoo-logs/nginx/access.log">Download Nginx logs</a>
            </div>
            <h2>(502 Bad Gateway)</h2>
            <p>The IoT Box received the request but was not able to handle it. You can try to refresh the page to see if the request can now be handled.</p>
            <p>If the error persists for more than 5 minutes:</p>
            <ol>
                <li>Force restart the IoT Box by unplugging the IoT power supply then plugging it in again</li>
                <li>Re-flash the SD card of the IoT Box, see:
                    <a href="https://www.odoo.com/documentation/latest/applications/general/iot/iot_advanced/updating_iot.html#iot-updating-iot-image-code" target="_blank">documentation</a>
                </li>
            </ol>
        </div>
        <div class="footer">
            <a target="_blank" href="https://www.odoo.com/help">Help</a>
            <a target="_blank" href="https://www.odoo.com/documentation/latest/applications/productivity/iot.html">Documentation</a>
        </div>
    </body>
</html>
